package com.pattern.strategy.strategypattern;

public class monster {
    private String id;
    private String name;
    private Double amount; //血量

    public monster(String id, String name, Double amount) {
        this.id = id;
        this.name = name;
        this.amount = amount;
    }

    public hurtState pay(String key){
        GameplayerHurt gameplayerHurt = HurtStrategy.get(key);
        System.out.println("进入地图");
        System.out.println(name+"怪物血量："+amount+"开始打怪..");
        return gameplayerHurt.pay(amount);
    }
}
